import request from '@/utils/request'

// 查询砍价商品列表
export function listBargainProduct(query) {
  return request({
    url: '/points/bargainProduct/list',
    method: 'get',
    params: query
  })
}

// 查询砍价商品详细
export function getBargainProduct(id) {
  return request({
    url: '/points/bargainProduct/' + id,
    method: 'get'
  })
}

// 新增砍价商品
export function addBargainProduct(data) {
  return request({
    url: '/points/bargainProduct',
    method: 'post',
    data: data
  })
}

// 修改砍价商品
export function updateBargainProduct(data) {
  return request({
    url: '/points/bargainProduct',
    method: 'put',
    data: data
  })
}

// 删除砍价商品
export function delBargainProduct(id) {
  return request({
    url: '/points/bargainProduct/' + id,
    method: 'delete'
  })
}
